//
//  ZXXInviteGroup.m
//  Xunbao_friend_zxx
//
//  Created by 朱骁雄 on 16/4/13.
//  Copyright © 2016年 朱骁雄. All rights reserved.
//

#import "ZXXInviteGroup.h"
#import "ZXXInvite.h"

@implementation ZXXInviteGroup

+(NSArray *)items{
    
    NSArray* dictArr = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"invite.plist" ofType:nil]];
    NSMutableArray * desArr = [NSMutableArray array];
    for (NSDictionary* dict in dictArr) {
        ZXXInviteGroup * ig = [ZXXInviteGroup inviteGroupWithDict:dict];
        [desArr addObject:ig];
    }
    
    return desArr;
}

-(instancetype)initWithDict:(NSDictionary *)dict{
    if (self=[super init]) {
        self.title = dict[@"title"];
        
        self.items = [ZXXInvite items:dict[@"items"]];
    }
    return self;
}



+ (instancetype)inviteGroupWithDict:(NSDictionary *)dict{
    
    return [[self alloc]initWithDict:dict];
}


@end
